package com.cincc.cinccimdemo.viewmodel;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.cincc.cinccimdemo.model.CardInfo;
import com.cincc.cinccimdemo.model.FriendInfoUI;
import com.cincc.im.model.dbmodel.SequenceInfo;

public class GlobalViewModel extends ViewModel {
    private MutableLiveData<SequenceInfo> entityLiveData;

    public void setSequenceInfo(SequenceInfo entity) {
        entityLiveData.postValue(entity);
    }

    public LiveData<SequenceInfo> getSequenceLiveData() {
        if (entityLiveData == null) {
            entityLiveData = new MutableLiveData<>();
        }
        return entityLiveData;
    }


    private MutableLiveData<CardInfo> cardLiveData;

    public void setCardInfo(CardInfo entity) {
        cardLiveData.postValue(entity);
    }

    public LiveData<CardInfo> getCardLiveData() {
        if (cardLiveData == null) {
            cardLiveData = new MutableLiveData<>();
        }
        return cardLiveData;
    }
}
